feat(traces): add more observation types#1290
Merged
Conversation
nimarb
commented
Aug 12, 2025
nimarb
commented
Aug 12, 2025
nimarb
commented
Aug 12, 2025
nimarb
commented
Aug 20, 2025
nimarb
commented
Aug 20, 2025
nimarb
commented
Aug 20, 2025
hassiebp
reviewed
Aug 21, 2025
* unrelated changes to generated sdk * also readme * reset * revert * revert
|
#1271 this merge request “Add float to MapValue in map_value.py to support optional float values.”, why rm float support in map_value.py now? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Enhanced Langfuse SDK with new observation types, deprecated old methods, and added comprehensive tests for validation.
agent,tool,chain,retriever,evaluator,embedding,guardrailinspan.py.@observedecorator to support newtypeparameter inobserve.py.start_generationandstart_as_current_generationin favor ofstart_observation.test_deprecation.pyto ensure deprecation warnings are emitted for deprecated methods.test_langchain.pyandtest_otel.pyto cover new observation types and ensure correct behavior.observation_type.py.annotation_queues/client.py.This description was created by
for 9512f06. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
This review covers only the changes made since the last review (commit 89b1b3e), not the entire PR.
The recent changes primarily focus on addressing feedback from previous reviews and adding enhanced developer tooling. The key updates include:
New
typeParameter in@observeDecorator: Introduces a dedicatedtypeparameter alongside the existingas_typeparameter in the@observedecorator. This provides improved developer experience by allowing@observe(type="agent")syntax. The implementation includes validation logic to prevent conflicting usage of both parameters and consolidation logic that merges the parameters appropriately.Type System Refinements: Updates type annotations throughout the codebase to be more consistent and comprehensive. The
as_typeparameter in various methods has been expanded from restrictive literals to broader observation type unions, improving type safety and IDE support.Enhanced Testing Infrastructure: Adds a comprehensive test file (
test_deprecation.py) that validates deprecation warnings for methods being phased out in favor of the new unified observation API. This ensures proper backward compatibility during the transition period.Developer Tooling: Adds type checking instructions to the contributing documentation (
CONTRIBUTING.md), providing clear guidance for contributors on running mypy type checking with the--no-error-summaryflag.API Client Updates: Updates the observations API client to support a new
levelparameter for filtering observations by severity levels (DEBUG, DEFAULT, WARNING, ERROR), expanding query capabilities.These changes build upon the core generalized graph visualization functionality introduced earlier in the PR, focusing on polishing the developer experience and ensuring robust testing coverage for the new observation type system.
Confidence score: 4/5
observe.pyto ensure the newtypeparameter works correctly with existingas_typeusage